/*
 * @Author: benchenchuang benchenchuang
 * @Date: 2023-06-01 19:22:34
 * @LastEditors: benchenchuang benchenchuang
 * @LastEditTime: 2023-10-17 19:24:08
 * @FilePath: /hmp-web/src/views/staff/labour/components/rules.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export const rules = {
    imageUrl: [{ required: true, message: '请选择上传头像', trigger: 'change' }],
    name: [
        { required: true, message: '请填写姓名', trigger: 'blur' },
        { min: 2, max: 20, message: '姓名长度2-20位', trigger: 'blur' },
        {
            pattern: new RegExp(/^((?!\+|\.|\\|\/|:|\*|\?|\!|<|>|\||'|%|@|#|&|\$|\^|&|\*).){1,50}$/),
            message: '名称不允许包含特殊字符',
            trigger: 'blur'
        }
    ],
    // code: [{ required: true, message: '请输入人员编码', trigger: 'blur' }],
    sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
    insureStatus: [{ required: true, message: '请选择投保', trigger: 'change' }],
    idNumber: [
        { required: true, message: '请输入身份证号', trigger: 'blur' },
        { required: true, message: '请输入正确的身份证号',
        pattern:new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/),
         trigger: 'blur' }
    ],
    entryTime: [{ required: true, message: '请选择入职时间', trigger: 'change' }],
    deptId: [{ required: true, message: '请选择项目部', trigger: 'change' }],
    workType: [{ required: true, message: '请选择工种', trigger: 'change' }],
    status: [{ required: true, message: '请选择状态', trigger: 'change' }],
    level: [{ required: true, message: '请选择评级', trigger: 'change' }],
    contact: [{ required: true, message: '请输入联系方式', trigger: 'blur' }],
    emergencyContact: [{ required: true, message: '请输入紧急联系人', trigger: 'blur' }]
};
